<link rel="stylesheet" type="text/css" href="css/login.css" />
<div class="content">
    <div class="bg">
        <div class="title">
            <h2>注册</h2>
            <div class="sj"></div>
        </div>
    </div>
    <div class="pt20">
        <?php
        $form = $this->beginWidget('CActiveForm', array(
            'id' => 'member-form',
            'enableAjaxValidation' => true,
            'enableClientValidation' => true,
            'clientOptions' => array(
                'validateOnSubmit' => true,
                'afterValidateAttribute'=>'js:function(form, attribute, data, hasError){if(hasError === false){$("#"+this.id+"_em_").html("正确").show()}}'
            )
                ));
        ?>
        <div class="zh">
            <p class="left">账　号</p>
            <?php echo $form->textField($model, 'username', array('class' => 'inp left', 'style' => 'color:#CCCCCC', 'value' => '邮箱/手机', 'onfocus' => 'if (value =="邮箱/手机"){this.style.color="#000000";value =""}', 'onblur' => 'if (value ==""){  this.style.color="#CCCCCC"; value="邮箱/手机"}')); ?>
            <?php echo $form->error($model, 'username'); ?>
        </div>
        <div class="mm">
            <p class="left">密　码</p>
            <?php echo $form->passwordField($model, 'password', array('class' => 'inp left')); ?>
            <?php echo $form->error($model, 'password'); ?><div id="fsd"></div>
        </div>
        <div class="zfmm">
            <p class="left">重复密码</p>
            <?php echo $form->passwordField($model, 're_password', array('class' => 'inp left')); ?>
            <?php echo $form->error($model, 're_password'); ?>
        </div>
        <div class="yzm">
            <p class="left">验证码</p>
            <?php echo $form->textField($model, 'verifyCode', array('class' => 'inp left')); ?>
            <?php $this->widget('CCaptcha', array('buttonLabel' => '换一个', 'imageOptions' => array('style' => 'vertical-align:middle'))); ?>
            <?php echo $form->error($model, 'verifyCode'); ?>
        </div>
        <div class="clear"></div>
        <div class="zcc">
            <?php echo CHtml::imageButton('images/zcc.jpg', array('width' => 215, 'height' => 42)) ?>
        </div>   
        <?php $this->endWidget(); ?>
    </div>
</div>
